import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import {h} from 'vue';
import {Switch} from 'ant-design-vue';

export const columns: BasicColumn[] = [
  {
    title: '资源编码',
    dataIndex: 'actionCode',
    width: 200,
  },
  {
    title: '资源名称',
    dataIndex: 'actionName',
    width: 200,
  },
  {
    title: '资源描述',
    dataIndex: 'actionDesc',
    width: 200,
  },
  {
    title: '资源父节点',
    dataIndex: 'menuId',
    width: 200,
  },
  {
    title: '优先级 越小越靠前',
    dataIndex: 'priority',
    width: 200,
  },
  {
    title: '状态:0-无效 1-有效',
    dataIndex: 'status',
    width: 200,
  },
  {
    title: '',
    dataIndex: 'createTime',
    width: 200,
  },
  {
    title: '',
    dataIndex: 'updateTime',
    width: 200,
  },
  {
    title: '保留数据0-否 1-是 不允许删除',
    dataIndex: 'isPersist',
    width: 200,
  },
  {
    title: '服务名称',
    dataIndex: 'serviceId',
    width: 200,
  },
];

export const searchFormSchema: FormSchema[] = [];

export const formSchema: FormSchema[] = [
  {
    label: '资源编码',
    field: 'actionCode',
    component: 'Input',
    required: true,
  },
  {
    label: '资源名称',
    field: 'actionName',
    component: 'Input',
    required: true,
  },
  {
    label: '资源描述',
    field: 'actionDesc',
    component: 'Input',
    required: true,
  },
  {
    label: '资源父节点',
    field: 'menuId',
    component: 'Input',
    required: true,
  },
  {
    label: '优先级 越小越靠前',
    field: 'priority',
    component: 'Input',
    required: true,
  },
  {
    label: '状态:0-无效 1-有效',
    field: 'status',
    component: 'Input',
    required: true,
  },
  {
    label: '',
    field: 'createTime',
    component: 'Input',
    required: true,
  },
  {
    label: '',
    field: 'updateTime',
    component: 'Input',
    required: true,
  },
  {
    label: '保留数据0-否 1-是 不允许删除',
    field: 'isPersist',
    component: 'Input',
    required: true,
  },
  {
    label: '服务名称',
    field: 'serviceId',
    component: 'Input',
    required: true,
  },
];
